Skip to content

Nftables: Avoid race condition between update and evaluation. - #13898

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test/cl955981065
Aug 1, 2026
Merged

Nftables: Avoid race condition between update and evaluation.#13898
copybara-service[bot] merged 1 commit into
masterfrom
test/cl955981065

Conversation

@copybara-service

Copy link
Copy Markdown

Nftables: Avoid race condition between update and evaluation.

  • There was no lock taken for Nftables rule evaluation.
    So, it could happen that while processing and simultaneous update,
    a packet could pass to half updated ruleset.

  • Changed logic to replace atomic pointer, instead of
    replacing fields in the Nftables.

  • All the rule evaluation, can now go without needing any reader lock.

  • A lock is require for updating Nftables object though,
    to serialize the Netlink messages.

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Jul 29, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl955981065 branch 3 times, most recently from 312bca2 to ad9a1fb Compare August 1, 2026 06:24
- There was no lock taken for Nftables rule evaluation.
    So, it could happen that while processing and simultaneous update,
    a packet could pass to half updated ruleset.

- Changed logic to replace atomic pointer, instead of
    replacing fields in the Nftables.

- All the rule evaluation, can now go without needing any reader lock.

- A lock is require for updating Nftables object though,
   to serialize the Netlink messages.

PiperOrigin-RevId: 957516505
@copybara-service
copybara-service Bot merged commit 6aad49c into master Aug 1, 2026
@copybara-service
copybara-service Bot deleted the test/cl955981065 branch August 1, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant